/*
day27
2019.9.24
*/
#include<iostream>
#include<string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
class Solution {
public:
    int findLUSlength(string a, string b) 
	{
		if(a==b)
		{
			return -1;
		}
        return a.length()>b.length() ? a.length():b.length();
    }
};
int main()
{
	Solution solution;
	string a="aba",b="cdc";
	cout<<solution.findLUSlength(a,b)<<endl;
	return 0;
} 
